package com.ruoyi.dingtalk.model;

import cn.hutool.json.JSONUtil;
import lombok.Data;
import lombok.ToString;

import java.util.List;
import java.util.stream.Collectors;

@Data
@ToString
public class BasePageResult {

    private Long next_cursor;

    private Boolean has_more;

    private List<String> list;

    public   <V> List<V> getList(Class<V> clazz){
        return list.stream().map(data-> JSONUtil.toBean(data,clazz)).collect(Collectors.toList());
    }

}
